import request from '@/utils/request.js'
// import store from '@/store'

// 用户请求模块

export const LoginAPI = data => {
  return request({
    method: 'POST',
    url: 'v1_0/authorizations',
    data
  })
}

// 发送验证码

export const SendAPI = mobile => {
  return request({
    method: 'GET',
    url: `/v1_0/sms/codes/${mobile}`
  })
}

//获取用户自己的信息

export const getUserInfoAPI = () => {
  return request({
    method: 'GET',
    url: '/v1_0/user'
    // headers: {
    //   Authorization: `Bearer ${store.state.user.token}`
    // }
  })
}

//获取频道列表数据

export const getUserChannelAPI = () => {
  return request({
    method: 'GET',
    url: '/v1_0/user/channels'
  })
}
